package com.getword.security;

import com.getword.domain.Role;
import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.List;


@Setter
@Getter
public class SUser extends User {
    private Long userId;
    private String name;


    public SUser(Long userId, String username, String password, List<GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.userId = userId;
    }
    public SUser(Long userId, String loginName,String username, String password, List<GrantedAuthority> authorities) {
        super(loginName, password, authorities);
        this.name = username;
        this.userId = userId;
    }


    private Role role;

}
